Repository navigation
Code map kept current, criteria traced to proof, non-functional checks in plans - #780
Merged
Merged
Conversation
…s in plans Code map: each repository keeps sections on its agent file record (architecture, stack, build and test, conventions, dependencies, one per top-level area), each stamped with the commit it describes. Before the planner starts, the map is brought to the run's base: the same commit or tree reuses every section, otherwise only the sections the comparison's paths touch are read again and rebuilt in one model call. The planner and the coder get it as context; the build's tool calls before its first write and the map's commit are kept on the run. Criteria trace: every description build traces each acceptance criterion to the files and definitions changed for it, the tests that cover it, and its proof on the head (the two-way proof, else the tests' runs with and without the change). The table goes in the description's checks, gaps are open items, and the trace is kept on the run and served by the run API. Non-functional checks: when a plan's files or the ticket reach infrastructure, CI, auth and security, data, a hot path or observability, design.md answers that area's checklist with sources; a "n/a" needs a reason. The lists are data in one file. Missing answers are plan gaps in the same send-back, with no new stop or approval.
The trace's gaps become coder items (common::trace::coder_items). The two -way proof already sends an item for a test that is missing, failing or not testing the ticket, so for those criteria the trace only adds untraced code. Each description build records the items on the run's checks ledger (run_guard::Ledger::trace) for its head. There they are open items like any check's: they hold the draft (open_findings) and the run converges on them (Target::of). The PR watch builds the description before it queues the two -way proof's round and sends both lists in one round. A pull request with no preview gets its round from the description build.
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three mechanisms for planning and proof:
Changes
Code map (
common::code_map,passes::code_map; docs:docs/code-map.md)code_mapattribute. It has five sections for the whole repository (architecture, stack and versions, build/test/run, conventions, dependencies between packages and services) and one section per top-level area (structure and entry points). Each section is stamped with the commit it describes.plan::runbrings the map to the run's base before it builds the prompt:code_map_refresh: the commit, why it refreshed, and which sections were reused, rebuilt or missed.exploration: the build's tool calls before its first write (counted in the coder's tool executor), its total tool calls, and the map commit it started from.Criteria trace (
common::trace; docs:docs/criteria-trace.md)e2e_proof::criteria_or_map: the same ticket list or plan criteria map the two-way proof uses. A map line can name its code with| code: <files or functions>.code:or else by the criterion's words. A ticket with one criterion owns the whole diff.habits_check). Otherwisenot_runormissing.description::buildrebuilds the trace from the facts of the head on every push:traceability.trace::coder_itemsturns each gap into an item for the coder, leaving out what the two-way proof already sends.run_guard::Ledger::trace, per head). There they hold the draft (open_findings) and count toward convergence (Target::of).pr_watchbuilds the description before queuing the two-way proof's round, then sends the proof's items and the trace's together in onequeue_own_review_round.GET /api/runs/{run_id}now returns typedtraceabilityandexplorationobjects, anddocs/api/openapi.jsonis regenerated.Non-functional checks (
common::nfr_check, data incommon/src/nfr_checklists.json; docs:docs/non-functional-checks.md)nfr_check::plan_gapsreads## Non-functional checksin design.md and flags a missing section, a missing item, ann/awithout a reason, and an answer without a source (a file, a command or a lookup). These gaps join the existing send-back (back), so there is no new stop and no approval gate.Replays (these fail on main):
incidents/dg_code_map_kept_current,dh_criteria_traced_to_proofanddi_infra_checklist_answered, each with its page indocs/incidents/. Each new common module also has unit tests.Verification
cargo fmt --all --check, plusrustfmt --checkon the three incident files.cargo clippy --all-targets -- -D warnings.cargo test --workspace(common, worker, gateway), including the incident suite and the OpenAPI completeness test.